import request from "@/utils/request";
import { ArtistRelativeDTO, ArtistRelative } from "./model";
import { Artist } from "../artist/model";

/**
 * 艺术机构API
 */
class ArtistRelativeAPI {


  /**
   * 获取关系
   *
   * @param data
   */
  static getList(data: ArtistRelativeDTO) {
    return request<any, ArtistRelative[]>({
      url: "/artistRelative/getList",
      method: "post",
      data: data,
    });
  }
  /**
   * 保存关系
   * @param data 
   * @returns 
   */
  static saveRelation(data: ArtistRelativeDTO) {
    return request({
      url: "/artistRelative/saveRelation",
      method: "post",
      data: data,
    });
  }

  /**
   * 根据艺术家id获取机构关系
   */
  static getListByArtistId(data: Artist) {
    return request<any, ArtistRelative[]>({
      url: "/artistRelative/getListByArtistId",
      method: "post",
      data: data,
    });
  }






}

export default ArtistRelativeAPI;
